package com.tanhua.app.Service;

import com.tanhua.api.UserApi;
import com.tanhua.app.interceptor.UserThreadLocal;
import com.tanhua.model.pojo.User;
import com.tanhua.model.vo.HuanXinUserVo;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HuanXinService {
@DubboReference
  private   UserApi userApi;
    public HuanXinUserVo findHuanxin() {
 User user= userApi.findById(UserThreadLocal.getid());
 return new HuanXinUserVo(user.getHxUser(),user.getHxPassword());
    }
}
